#include<bits/stdc++.h>
using namespace std;
const int N=2e5;
int a[N],b[N];
int main(){
	int n,t;
	cin>>t;
	while(t--)
	{
		cin>>n;
		for(int i=1;i<=n;i++)
			cin>>a[i];
		for(int i=1;i<=n;i++)
			cin>>b[i];	
		for(int i=1;i<=n;i++)
		{
			if(i==1)
			{
				cout<<b[1]-a[1]<<" ";
			}
			else 
			{
				if(b[i-1]<a[i])
					cout<<b[i]-a[i]<<" ";
				else 
					cout<<b[i]-b[i-1]<<" ";
			}
		}	
			
		cout<<endl;	
	}
	
	return 0;
}
